package top.xinsix.est.mapper;
import top.xinsix.est.dto.ModelDto;
import top.xinsix.est.dto.ModelTypeDto;
import top.xinsix.est.pojo.Model;
import org.apache.ibatis.annotations.Param;
import top.xinsix.est.req.ModelReq;
import top.xinsix.est.req.ModelTypeReq;

import java.util.List;
import java.util.Map;

public interface ModelMapper {

	public Model getModelById(@Param(value = "id") Long id);

	public List<Model>	getModelListByMap(Map<String,Object> param);

	public Integer getModelCountByMap(Map<String,Object> param);

	public Integer insertModel(Model model);

	public Integer updateModel(Model model);

	public Integer deleteModelById(@Param(value = "id") Long id);

	public Integer batchDeleteModel(Map<String,List<String>> params);

	/**
	 *根据品牌id查询商品型号(类型)列表
	 * @param modelTypeReq model请求参数对象
	 * @return品型号(类型)列表
	 */
	public List<ModelTypeDto> findModelTypeByBId (ModelTypeReq modelTypeReq) ;

	/**
	 * 根据商品名称、品牌id、分类id分页查询商品列表
	 * @param modelReq 查询条件对象
	 * @return 商品列表
	 */
	List<ModelDto> getModelListByModelReq(ModelReq modelReq);

	public int getCountByModelReq(ModelReq modelReq);
}
